using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;

namespace Zeus.Biz.DomainModel.NHib.Northwind {
    public class TerritoryMap : ClassMap<Territory> {
        
        public TerritoryMap() {
			Table("Territories");
			LazyLoad();
			Id(x => x.TerritoryID).GeneratedBy.Assigned().Column("TerritoryID");
			References(x => x.Region).Column("RegionID");
			Map(x => x.TerritoryDescription).Column("TerritoryDescription").Not.Nullable().Length(50);
			HasMany(x => x.EmployeeTerritories).KeyColumn("TerritoryID");
        }
    }
}
